import { Component, OnInit } from '@angular/core';
import { loginPage } from '../../../app-routing.module';
import { Router } from '@angular/router';
import {WebStorageService} from "../../../services/webStorage.service";

@Component({
    selector: 'app-no-page',
    templateUrl: './index.component.html',
    styleUrls: ['./index.component.scss']
})
export class NoPageComponent implements OnInit {
    constructor(
        private router: Router,
        private webStorageService: WebStorageService
    ) {
    }
    ngOnInit() {
    }

    toLogin(){
        this.webStorageService.clear();
        this.router.navigate([loginPage.path]).finally();
    }
}
